package cn.qdhlm.testrocketmq.rocketmqhelper;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Name:RocketMqProducer
 * @description:'
 * @author: xinY
 **/
@Component
public class RocketMqProducer {
    @Autowired
    private RocketMQTemplate template;

    public void send(String topic, Object msg) {
        this.template.convertAndSend(topic, msg);
    }
}
